﻿<%@ Page Title="Reservar/Alterar Mesa" Language="C#" MasterPageFile="~/Site.Master" CodeBehind="Edit.aspx.cs" Inherits="Kakaroto.Administracao.Mesa.Edit" %>

<asp:Content runat="server" ContentPlaceHolderID="MainContent">
    <div>
        <p>&nbsp;</p>
        <asp:FormView runat="server"
            ItemType="Kakaroto.Models.Mesa" DefaultMode="Edit" DataKeyNames="Id"
            UpdateMethod="UpdateItem" SelectMethod="GetItem"
            OnItemCommand="ItemCommand" RenderOuterTable="false">
            <EmptyDataTemplate>
                Não foi possível encontrar a mesa <%: Request.QueryString["Id"] %>
            </EmptyDataTemplate>
            <EditItemTemplate>
                <fieldset class="form-horizontal">
                    <legend>Editar/Alterar Mesa</legend>
                    <asp:ValidationSummary runat="server" CssClass="alert alert-danger" />
                   

                    <div style="padding: 10px"><span style="margin-left: 145px; margin-right: 30px;">ID </span>
                        <asp:DynamicControl Mode="ReadOnly" DataField="Id" runat="server" />
                    </div>
                    <div style="padding: 10px"><span style="margin-left: 105px; margin-right: 30px;">Cadeiras </span>
                        <asp:DynamicControl Mode="ReadOnly" DataField="Cadeiras" runat="server" />
                    </div>
                    <asp:DynamicControl Mode="Edit" DataField="Reserva" runat="server" />
                    <asp:DynamicControl ID="Hora" Mode="Edit" DataField="Hora"  ValidationGroup="CliHor" runat="server" />
                    <asp:DynamicControl ID="Cliente" Mode="Edit" DataField="Cliente" ValidationGroup="CliHor" runat="server" />
                    
                    
                    <div class="form-group">
                        <div class="col-sm-offset-2 col-sm-10">
                            <asp:Button runat="server" ID="UpdateButton" CommandName="Update" Text="Reservar" CssClass="btn btn-primary" />
                            <asp:Button runat="server" ID="CancelButton" CommandName="Cancel" Text="Voltar" CausesValidation="false" CssClass="btn btn-default" />
                        </div>
                    </div>

                </fieldset>
            </EditItemTemplate>
        </asp:FormView>
    </div>
</asp:Content>

